package com.lhb.ojserviceclient.feignclient;

import com.lhb.ojmodel.model.entity.Question;
import com.lhb.ojmodel.model.entity.QuestionSubmit;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "oj-question-service",path = "/api/question/inner")
public interface QuestionFeignClient {
    @GetMapping("/get/id")
    Question getById(@RequestParam("questionId") Long questionId);

    @GetMapping("/question_submit/get/id")
    QuestionSubmit getQuestionSubmitById(@RequestParam("questionSubmitId") Long questionSubmitId);

    @PostMapping("/question_submit/update")
    boolean updateById(@RequestBody QuestionSubmit questionSubmit);
}
